package com.zhuxiaomei.entity.restaurant;

import com.zhuxiaomei.entity.base.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 表名：restaurant_orders
*/
@Table(name = "restaurant_orders")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class RestaurantOrder extends BaseEntity {
    /**
     * 订单No
     */
    @Column(name = "order_no")
    private String orderNo;

    /**
     * 订单状态，1：已下单，2：已接单，3：已完成，4：退款
     */
    private Integer status;

    /**
     * 下单用户id
     */
    @Column(name = "order_user_id")
    private Long orderUserId;

    /**
     * 下单用户id
     */
    @Column(name = "receive_user_id")
    private Long receiveUserId;

    /**
     * 下单时间
     */
    @Column(name = "order_time")
    private LocalDateTime orderTime;

    /**
     * 接单时间
     */
    @Column(name = "received_time")
    private LocalDateTime receivedTime;

    /**
     * 结账时间
     */
    @Column(name = "checkout_time")
    private LocalDateTime checkoutTime;

    /**
     * 总金额
     */
    private BigDecimal amount;


    /**
     * 取消原因
     */
    @Column(name = "cancel_reason")
    private String cancelReason;

    /**
     * 取消时间
     */
    @Column(name = "cancel_time")
    private LocalDateTime cancelTime;
}